{	Problem: http://codeforces.ru/problemset/problem/58/B
	Verdict: Accepted

}
var i,n,p:longint;
begin
readln(n);
write(n,' ');
p:=n;
for i:=n-1 downto 1 do
  if p mod i=0 then begin
    write(i,' ');
    p:=i;
  end;
end.